For current control purposes it is often desired to measure the average or RMS value of the current flowing through an inductive device such as a solenoid, control valve or relay coil which is supplied by a pulse width modulated voltage. By varying the duty cycle of the applied voltage the current can be controlled to some desired average value. Because the rate of current increase or decrease through the inductive device is controlled primarily by the L/R time constant of the device, and since this time constant tends to be on the same order as the period of the PWM signal, considerable ripple often appears in the current waveform; the waveform tends to look somewhat like a triangle wave.
Traditional control system approaches to removing this ripple usually involve the use of a low-pass filter; the time constant and number of poles of the filter determine the ripple attenuation level and the step response of the system. Usually these two considerations tend to work against each other; heavy low-pass filtering, i.e. good ripple rejection, leads to poor step response and vice versa. Thus to preserve system response to avoid ringing or overshoot in the control system, only light filtering is used. Then some ripple will be evident in the filtered signal and when occasional current samples are read to obtain feedback data for control purposes, the samples dither about the average current, even during steady state conditions.
For example, in a system using 300 or 600 Hz PWM solenoid coil activation where time constant consistency is important, tight tolerance parts are used to construct a low-pass RC filter at high expense. Because the ripple signal is at 300 or 600 Hz, and the filter -3 dB point is 46 Hz, not all of the ripple is attenuated (only about 16 to 22 dB). Moreover, because the filter has a fairly long time constant (3.465 msec) compared to the time constant of the solenoid (about 7 msec), the output of the filter greatly lags the actual current during a step change in current. FIG. 1 illustrates the waveforms for this arrangement, the graphs beginning shortly after initial load energization so that the current is approaching its steady state condition. FIG. 1A shows a PWM control signal which has a 90% ON duty cycle. The remaining graphs show current in the narrow range of 1.73 to 1.83 amps. FIG. 1B shows the increasing actual current while FIG. 1C shows the RC filtered current, the ripple being evident. FIG. 1D shows the current as sampled periodically by a microprocessor. Aliasing-induced ripple occurs due to the asynchronous operation of the PWM and the sampling, that is, because the sampling period is different from the ripple period the ripple appears as dither in the sampled value as evidenced by dips in the waveform.
Thus it is apparent that it is desirable to determine the average current in an inductive load driven by a PWM input with low ripple (no ripple for steady state conditions), reduced lag during current transients, and at a lower cost.